<?php

/*
 * Here we override the default HTML output of drupal.
 * refer to http://drupal.org/node/550722
 */
 
// Auto-rebuild the theme registry during theme development.
if (theme_get_setting('clear_registry')) {
  // Rebuild .info data.
  system_rebuild_theme_data();
  // Rebuild theme registry.
  drupal_theme_rebuild();
}
function freeport_preprocess_page(&$vars){
   $vars['footer_msg'] = ' &copy; ' . $vars['site_name'] . ' ' . date('Y');
 }
function freeport_preprocess_node(&$vars) {
   $postdate = format_date($vars['created'], 'custom', 'd F Y');
   $vars['posted_by'] = t('By') . ' ' .$vars['name'] . ' ' . t('on') . ' ' . $postdate;
 }
 function freeport_preprocess_comment_wrapper(&$vars) {
    $node = $vars['node'];
	$vars['header'] = t('<strong>!count comments</strong> on %title', array('!count' => $node->comment_count, '%title' => $node->title));
 }
 function freeport_preprocess_comment(&$vars) {
 	$vars['class'] = array('comment');
    if ($vars['zebra'] == 'odd') {
	  $vars['class'][] = 'alt';
    }
    if ($vars['comment']->uid == $vars['node']->uid) {
	   $vars['class'][] = 'authorcomment';
    }
    $vars['class'] = implode(' ', $vars['class']);
 }